/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controlacciones.ejb3.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author vanessa
 */
@Embeddable
public class TbTotfacPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id_factura")
    private int idFactura;
    @Basic(optional = false)
    @Column(name = "facemifec")
    @Temporal(TemporalType.TIMESTAMP)
    private Date facemifec;

    public TbTotfacPK() {
    }

    public TbTotfacPK(int idFactura, Date facemifec) {
        this.idFactura = idFactura;
        this.facemifec = facemifec;
    }

    public int getIdFactura() {
        return idFactura;
    }

    public void setIdFactura(int idFactura) {
        this.idFactura = idFactura;
    }

    public Date getFacemifec() {
        return facemifec;
    }

    public void setFacemifec(Date facemifec) {
        this.facemifec = facemifec;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idFactura;
        hash += (facemifec != null ? facemifec.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbTotfacPK)) {
            return false;
        }
        TbTotfacPK other = (TbTotfacPK) object;
        if (this.idFactura != other.idFactura) {
            return false;
        }
        if ((this.facemifec == null && other.facemifec != null) || (this.facemifec != null && !this.facemifec.equals(other.facemifec))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "controlacciones.ejb3.entity.TbTotfacPK[idFactura=" + idFactura + ", facemifec=" + facemifec + "]";
    }

}
